<template>
  <div>
    <el-table :cell-style="{ padding: this.tablePadding }" border :data="repairTaskList" height="200">
      <el-table-column
        label="问题描述"
        align="center"
        prop="problemDescription"
      />
      
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { delRepairTaskDetails } from "@/api/equipment/repairTask";
export default {
  props: ["repairTaskList"],
  data() {
    return {
    };
  },
  methods: {
    
    handleDelete(row) {
      this.$confirm(
        '是否确认删除设备维修编号为"' + row.repairTaskdetailId + '"的数据项?',
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",closeOnClickModal:false,
          type: "warning",
        }
      )
        .then(function () {
          return delRepairTaskDetails(row.repairTaskdetailId);
        })
        .then(() => {
          this.$emit("delFunc");
          this.msgSuccess("删除成功");
        });
    },
  },
};
</script>

<style>
</style>